package com.caochenlei.tree.trie;

public class TrieTest {
    public static void main(String[] args) {
        Trie<String> trie = new Trie<>();

        trie.add("tom", "tom@qq.com");
        trie.add("lucy", "lucy@qq.com");
        trie.add("mark", "mark@qq.com");
        trie.add("bill", "bill@qq.com");
        trie.add("james", "james@qq.com");
        trie.add("alan", "alan@qq.com");
        trie.add("jack", "jack@qq.com");

        System.out.println(trie.remove("123"));
        System.out.println(trie.remove("tom"));
        System.out.println(trie.remove("james"));
        System.out.println(trie.startsWith("jame"));
        System.out.println(trie.remove("jack"));
        System.out.println(trie.size());
    }
}
